package net.ads.log;

import org.apache.hadoop.hive.ql.exec.UDF;
import org.lionsoul.ip2region.DbConfig;
import org.lionsoul.ip2region.DbSearcher;

import java.util.HashMap;
import java.util.Map;

public class PareIpSer extends UDF {
    public System evaluate(String ipStr) throws Exception{
        Map<String,String> map=new HashMap<String,String>();

        DbSearcher dbSearcher=new DbSearcher(
                new DbConfig();
//                "/home/bwie/ip2region"

        map.put();
        map.put();
        map.put();
        map.put();
        map.put();

        return dbSearcher;
        )

    }

    public static void main(String[] args) throws Exception {
        System.out.println(new PareIpSer().evaluate("203.195.136.146"));
    }
}
